get:
  tags:
    - Presets
  operationId: getPreset
  summary: Retrieve a Preset
  description: Retrieve a single preset by unique identifier.
  security:
    - Auth: []
  parameters:
    - $ref: '../../openapi.yaml#/components/parameters/Fields'
    - $ref: '../../openapi.yaml#/components/parameters/Meta'
  responses:
    '200':
      description: Successful request
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '../../openapi.yaml#/components/schemas/Presets'
    '401':
      $ref: '../../openapi.yaml#/components/responses/UnauthorizedError'

patch:
  tags:
    - Presets
  operationId: updatePreset
  summary: Update a Preset
  description: Update an existing preset.
  parameters:
    - $ref: '../../openapi.yaml#/components/parameters/Fields'
    - $ref: '../../openapi.yaml#/components/parameters/Meta'
  requestBody:
    content:
      application/json:
        schema:
          type: object
          required: [collection]
          properties:
            collection:
              type: string
              description: What collection this collection preset is used for.
              example: articles
            title:
              type: string
              description:
                Name for the bookmark. If this is set, the collection preset will be considered to be a bookmark.
              example: Highly rated articles
            role:
              type: integer
              description:
                The unique identifier of a role in the platform. If user is null, this will be used to apply the
                collection preset or bookmark for all users in the role.
            search_query:
              type: string
              description: What the user searched for in search/filter in the header bar.
            filters:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                    example: rating
                  operator:
                    type: string
                    example: gte
                  value:
                    type: integer
                    example: 4.5
            view_type:
              type: string
              description: Name of the view type that is used. Defaults to tabular.
            view_query:
              type: string
              description:
                View query that's saved per view type. Controls what data is fetched on load. These follow the same
                format as the JS SDK parameters.
            view_options:
              type: string
              description: Options of the views. The properties in here are controlled by the layout.
            translation:
              type: object
              description:
                Key value pair of language-translation. Can be used to translate the bookmark title in multiple
                languages.
  responses:
    '200':
      description: Successful request
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '../../openapi.yaml#/components/schemas/Presets'
    '401':
      $ref: '../../openapi.yaml#/components/responses/UnauthorizedError'

delete:
  tags:
    - Presets
  operationId: deletePreset
  summary: Delete a Preset
  description: Delete an existing preset.
  security:
    - Auth: []
  responses:
    '200':
      description: Successful request
    '401':
      $ref: '../../openapi.yaml#/components/responses/UnauthorizedError'
parameters:
  - $ref: '../../openapi.yaml#/components/parameters/Id'
